Last updated by: rspoerl1, Last updated on: 26/08/2025
Wazuh Docker Container and Web Container Runtime Monitoring
Document Creation: 05 May, 2025. Last Edited: 05 May, 2025. Authors: Bikendra Gurung.
Effective Date: 05 May, 2025. Expiry Date: 05 May, 2026.
Overview
This technical guide provides detailed step-by-step instructions on how to configure Wazuh to monitor Docker container lifecycle events and runtime web container logs on a Docker host. In addition, it enables detection of container activity and potential web-based attacks, enhancing overall visibility and incident response capabilities.
Prerequisites
- A Wazuh agent installed on the Docker host.
- Docker installed on the host system.
- Admin/Root access to the Wazuh Docker host (Linux server).
- Familiarity with docker, docker-compose, and basic Linux operations.
Step 1: Install Docker Python Library
Install the required Python library and dependencies to allow Wazuh to interface with Docker:
sudo su
cd ~
apt-get update && apt-get install python3
pip3 install docker==7.1.0 urllib3==2.2.2 requests==2.32.2

Step 2: Configure Wazuh Agent for Docker Listener
2.1. Enable Docker Listener in Wazuh Agent
Edit the agent configuration file:
vim /var/ossec/etc/ossec.conf
Add the following block:
<wodle name="docker-listener">
<interval>10m</interval>
<attempts>5</attempts>
<run_on_start>no</run_on_start>
<disabled>no</disabled>
</wodle>
Note:
• This enables the Wazuh Docker wodle to collect Docker container metadata and activity events.
• The listener attempts to execute five times at ten-minute intervals if it fails.
